/**
 * 
 */
package com.basic;

/**
 * TestBitOperate.java. 2011-11-11上午11:44:38 @author LionBule.
 */
public class TestBitOperate {

    /**
     * @param args
     */
    public static void main(String[] args) {

        int taobaoSell = Integer.parseInt("00000001", 2);
        int taobaoBuy = Integer.parseInt("00000010", 2);
        int taobaoSellBuy = Integer.parseInt("00000011", 2);
        int tmall = Integer.parseInt("00000100", 2);
        int b2bcn = Integer.parseInt("00001000", 2);
        int b2ben = Integer.parseInt("00010000", 2);
        
        
        System.out.println(taobaoSell);
        System.out.println(taobaoBuy);
        System.out.println(taobaoSellBuy);
        System.out.println(tmall);
        System.out.println(b2bcn);
        System.out.println(b2ben);
        
        System.out.println(taobaoSell|taobaoBuy);
        
        System.out.println((taobaoSell&taobaoSellBuy)==taobaoSell);
        System.out.println((taobaoBuy&taobaoSellBuy)==taobaoBuy);
        
    }

}
